 //get global object
const app = getApp();
Page({ 
    data: { 
        indicatorDots: false,
        autoplay: false,
        interval: 1000,
        duration: 500,
        currentVal : 0,


        item : [
            {
                bgImg : '/public/img/pencil.png',
                bgColor : '#F4FEF3',
                titleColor : '#55974F',
                subTitleColor : '#C4D8BD',
                borderColor : '#F4F9F3',
                bigTitle : '文字录入',
                subTitle : '大量文字录入，我们帮您，省时、省心。'

            },

            {
                bgImg : '/public/img/graphic_design.png',
                bgColor : '#F3F6FF',
                titleColor : '#626AA8',
                subTitleColor : '#979BAF',
                borderColor : '#F0F2FF',
                bigTitle : '代抄写服务',
                subTitle : '大量文字录入，我们帮您，省时、省心。'
            },

            {
                bgImg : '/public/img/bulletin_board.png',
                bgColor : '#FCEFFF',
                titleColor : '#91619B',
                subTitleColor : '#AB92B2',
                borderColor : '#FCEEFF',
                bigTitle : 'Word 排版',
                subTitle : '大量文字录入，我们帮您，省时、省心。'
            },

            {
                bgImg : '/public/img/bulletin_board.png',
                bgColor : '#e6e6e6',
                titleColor : '#AFAFAF',
                subTitleColor : '#CACACA',
                borderColor : '#D9D9D9',
                bigTitle : '论文代写',
                subTitle : '大量文字录入，我们帮您，省时、省心。'
            }
        ],


        infoItemData : [
            {
                infoItemTitle : '公司简介',
                infoItemContent : 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' 
            },

            {
                infoItemTitle : '团队介绍',
                infoItemContent : 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' 
            },

            {
                infoItemTitle : '联系我们',
                infoItemContent : 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' 
            },

        ]

    },
    onLoad: function(options) {
            // Do some initialize when page load.
    },
    onReady: function() {
            // Do something when page ready.
    },
    onShow: function() {
            // Do something when page show.
    },
    onHide: function() {
            // Do something when page hide.
    },
    onUnload: function() {
            // Do something when page close.
    },
    onPullDownRefresh: function() {
            // Do something when pull down.
    },
    onReachBottom: function() {
            // Do something when page reach bottom.
    },
    swiperChange : function (event) {
        console.log(event.detail.current);
        this.setData({
            currentVal : event.detail.current
        })
    },
    changeTab : function (event) {
        if ( event.target.id === "button1" ) {
            this.setData({
                currentVal : 0
            })
        }

        if ( event.target.id === "button2" ) {
            this.setData({
                currentVal : 1
            })
        }
    },
    // Event handler.
    viewTap: function() {
            this.setData({
                    text: 'Set some data for updating view.'
            })
    },
    customData: {
            hi: 'MINA'
    }
})